#1.在字典中新增元素，使用[ ]来进行
# student = {
#     'id': 1,
#     'name': 'zhangsan',
# }
# print(student)
# #向字典里插入新的键值对
# student['score'] = 90
# print(student)

# #2.在字典中，根据key修改value，也是使用[ ]
# student = {
#     'id': 1,
#     'name': 'zhangsan',
# }
# print(student)
# #向字典里插入新的键值对
# student['score'] = 90
# print(student)
# student['score'] = 99
# print(student)

#3.使用pop方法，根据key修改键值对
student = {
    'id': 1,
    'name': 'zhangsan',
    'score': 99
}
print(student)
student.pop('id')
print(student)
